package cn;

import cn.lanqiao.entity.Manager;
import cn.lanqiao.view.ManagerView;
import cn.lanqiao.view.StudentView;

import java.util.Scanner;

public class mainmenu {
    static Scanner sc = new Scanner(System.in);
    static StudentView sv = new StudentView();
    public static void main(String[] args) {
        ManagerView mv = new ManagerView();
        Manager user = null;

        System.out.println("----------欢迎来到蓝桥学院管理系统--------------");
        while (true) {
            //前往登录
            Manager loginuser = mv.login();
            if (loginuser == null) {
                System.out.println("登陆失败");
            } else {
                user = loginuser;
                System.out.println("欢迎您" + user.getMagerName() + "!");
                //浸入主界面
                manview();
            }
        }
    }

    private static void manview() {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("---------------");
            System.out.println("1.学生信息管理");
            System.out.println("2.学生成绩管理");
            System.out.println("3.退出登录");
            System.out.println("请选择：");
            String choose = sc.next();
            if (choose.equals("1")) {
                sv.StudentMainView();
            } else if (choose.equals("2")) {

            } else if (choose.equals("3")) {

            }else {
                System.out.println("按要求输入！");
            }
        }
    }
}
